package com.rongke.enums;

/**
 * Created by bilibili on 2017/8/2.
 */
public enum EachTypeEnum {
    INDEX(1,"首页轮播"),EXPECIENCEGOODS(4,"体验推荐");





    private Integer type;
    private String typeName;
    EachTypeEnum(Integer type, String typeName) {
        this.type = type;
        this.typeName = typeName;
    }
    /**
     * 根据type 获取typeName
     * @param type
     * @return
     */
    public static EachTypeEnum getTypeNameByType(Integer type) {
        for (EachTypeEnum typeEnum: values()) {
            if (typeEnum.getType().equals(type)) {
                return typeEnum;
            }
        }
        return null;
    }


    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }
}
